package com.xiaomili.halfsugar.fragment;


import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.xiaomili.halfsugar.R;
import com.xiaomili.halfsugar.activity.LoginActivity;
import com.xiaomili.halfsugar.activity.MainActivity;

import butterknife.ButterKnife;
import butterknife.InjectView;
import butterknife.OnClick;

/**
 * A simple {@link Fragment} subclass.
 */
public class MessageFragment extends Fragment {


    @InjectView(R.id.iv_Back)
    ImageView ivBack;
    @InjectView(R.id.tv_Login)
    TextView tvLogin;
    @InjectView(R.id.tb_msg)
    Toolbar tbMsg;
    @InjectView(R.id.iv_ic_launcher)
    ImageView ivIcLauncher;
    @InjectView(R.id.tv_sign)
    TextView tvSign;
    @InjectView(R.id.rl_msg2)
    RelativeLayout rlMsg2;
    @InjectView(R.id.iv_WX)
    ImageView ivWX;
    @InjectView(R.id.iv_WB)
    ImageView ivWB;
    @InjectView(R.id.iv_QQ)
    ImageView ivQQ;

    public MessageFragment() {
        // Required empty public constructor
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View view = inflater.inflate(R.layout.fragment_message, container, false);
        ButterKnife.inject(this, view);
        return view;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        ButterKnife.reset(this);
    }

    @OnClick({R.id.iv_Back, R.id.tv_Login, R.id.iv_WX, R.id.iv_WB, R.id.iv_QQ})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.iv_Back:
                startActivity(new Intent(getActivity(), MainActivity.class));
                break;
            case R.id.tv_Login:
                startActivity(new Intent(getActivity(), LoginActivity.class));
                break;
            case R.id.iv_WX:
                break;
            case R.id.iv_WB:
                break;
            case R.id.iv_QQ:
                break;
        }
    }
}
